package com.jh.service.utils;


public class SizeTypeUtil {
    /**
     * 将尺码类型编号转换为字符串
     */
    public static String convertSizeTypeToStr(int sizeType) {
        switch (sizeType) {
            case 0: return "F";
            case 1: return "XS";
            case 2: return "S";
            case 3: return "M";
            case 4: return "L";
            case 5: return "XL";
            case 6: return "2XL";
            case 7: return "3XL";
            default: return "未知";
        }
    }

    /**
     * 可选方法：将字符串尺码反转为编号（如果需要）
     */
    public static int convertSizeStrToInt(String sizeStr) {
        switch (sizeStr) {
            case "F": return 0;
            case "XS": return 1;
            case "S": return 2;
            case "M": return 3;
            case "L": return 4;
            case "XL": return 5;
            case "2XL": return 6;
            case "3XL": return 7;
            default: return -1;
        }
    }
}
